﻿<div>	
	<div>
		<h1>Raport dla ogrodu <i><?php echo $garden_name ?></i></h1>
	</div>
	<br />	
	<?php
		$i=0;
		foreach($all_items as $items)
		{
	?>			
			<div>
				<div class="category_div"><h3 style="padding-left:5px;"><?php echo $items[0] ?></h3></div>
				<div>
					<?php
						if(count($items[1]))
						{
					?>
					<table class="raport_table">
						<colgroup style="width: 10px;"></colgroup>
						<colgroup style="width: 250px;"></colgroup>
						<colgroup style="width: 250px;"></colgroup>	
						<colgroup style="width: 250px;"></colgroup>	
							<tr>					
								<td></td>
								<td>Nazwa</td>
								<td>Dostawca</td>
								<td>Cena</td>						
							</tr>
							
							<?php
								foreach($items[1] as $item)
								{
							?>
								<tr id="dsf">
									<td></td>
									<td><?php echo $item->getItem()->getNamePl() ?></td>
									<td><?php echo $items_supplier[$item->getItemId()]->getSupplier()->getNazwa() ?></td>
									<td><span class="price"><?php echo $items_supplier[$item->getItemId()]->getPrice() ?></span> zł</td>
								</tr>
							<?php
								}
							?>
							
					</table>
					<?php
						}else{
							echo "<div style='border: 1px solid black'>Brak produktów</div>";
						}
					?>
					<br />
				</div>
			</div>	
		
	<?php
		}	
	?>
	<div>	
		<h2>Suma końcowa: <span class="total_price"><?php echo $sum_price ?></span> zł</h2>		
	</div>
	<div>	
		<form action="<?php echo url_for('@raporting_save?id='.$garden_id) ?>" method="post">		
		<input  type="submit" value="Poporos o wycene" />
	</form>	
	<form action="<?php echo url_for('@list_raport') ?>" method="post">
		<input  type="submit" value="Cofnij" />
	</form>

	<form id="genpdf" action="<?php echo url_for('@raporting_save_pdf?id='.$garden_id) ?>" method="post">		
		<input  type="submit" value="Drukuj PDF" />
	</form>	
	</div>
</div>
	
	
	
</div>

